package com.lee.factory;

import com.lee.api.LeeClientService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class LeeClientFallbackFactory implements FallbackFactory<LeeClientService> {

    @Override
    public LeeClientService create(Throwable throwable) {
        return new LeeClientService() {
            @Override
            public String list() {
                return "服务暂停，下午14:00开启";
            }
        };
    }

}
